home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Rice_CMS / gopher24 / e2a.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1992-09-23  |  2.8 KB  |  68 lines

  1. /* ----------------------------------------------------------------- ╞CS
  2.  * ASCII to EBCDIC and vice-versa code conversion tables.
  3.  * Tables included here are based on ASCII conforming to the ISO8859-1
  4.  * Latin 1 character set and EBCDIC conforming to the IBM Code Page 37
  5.  * Latin 1 character set (except for three pairs of characters in 037).
  6.  *
  7.  *        Name: E2A REXX
  8.  *              CMS Pipelines filter to translate EBCDIC to ASCII
  9.  *      Author: Rick Troth, Rice University, I/S VM Systems Support
  10.  *        Date: 1992-Feb-27 for the filter, earlier for the table
  11.  *
  12.  *        Note:
  13.  *              These tables are provided in source form so that you
  14.  *              may modify them locally.  I recommend that you not
  15.  *              modify them just to make things look right on your
  16.  *              screen.  If you have an older terminal and there are
  17.  *              not more than a dozen code-points that are wrong,
  18.  *              then you're better off using CODEPAGE EXEC to set the
  19.  *              CMS INPUT/OUTPUT translate tables.   GOPHER EXEC
  20.  *              *does respect*  CMS' translate tables.
  21.  */
  22.  
  23.     i =      '000102030405060708090A0B0C0D0E0F'x
  24.     i = i || '101112131415161718191A1B1C1D1E1F'x
  25.     i = i || '202122232425262728292A2B2C2D2E2F'x
  26.     i = i || '303132333435363738393A3B3C3D3E3F'x
  27.     i = i || '404142434445464748494A4B4C4D4E4F'x
  28.     i = i || '505152535455565758595A5B5C5D5E5F'x
  29.     i = i || '606162636465666768696A6B6C6D6E6F'x
  30.     i = i || '707172737475767778797A7B7C7D7E7F'x
  31.     i = i || '808182838485868788898A8B8C8D8E8F'x
  32.     i = i || '909192939495969798999A9B9C9D9E9F'x
  33.     i = i || 'A0A1A2A3A4A5A6A7A8A9AAABACADAEAF'x
  34.     i = i || 'B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF'x
  35.     i = i || 'C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF'x
  36.     i = i || 'D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF'x
  37.     i = i || 'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF'x
  38.     i = i || 'F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF'x
  39.  
  40.     a =      '000102039C09867F978D8E0B0C0D0E0F'x
  41.     a = a || '101112139D8508871819928F1C1D1E1F'x
  42.     a = a || '80818283840A171B88898A8B8C050607'x
  43.     a = a || '909116939495960498999A9B14159E1A'x
  44.     a = a || '20A0E2E4E0E1E3E5E7F1A22E3C282B7C'x
  45.     a = a || '26E9EAEBE8EDEEEFECDF21242A293B5E'x
  46.     a = a || '2D2FC2C4C0C1C3C5C7D1A62C255F3E3F'x
  47.     a = a || 'F8C9CACBC8CDCECFCC603A2340273D22'x
  48.     a = a || 'D8616263646566676869ABBBF0FDFEB1'x
  49.     a = a || 'B06A6B6C6D6E6F707172AABAE6B8C6A4'x
  50.     a = a || 'B57E737475767778797AA1BFD05BDEAE'x
  51.     a = a || 'ACA3A5B7A9A7B6BCBDBEDDA8AF5DB4D7'x
  52.     a = a || '7B414243444546474849ADF4F6F2F3F5'x
  53.     a = a || '7D4A4B4C4D4E4F505152B9FBFCF9FAFF'x
  54.     a = a || '5CF7535455565758595AB2D4D6D2D3D5'x
  55.     a = a || '30313233343536373839B3DBDCD9DA9F'x
  56.  
  57. /* ----------------------------------------------------------------- E2A
  58.  * Translate EBCDIC to ASCII.
  59.  */
  60. 'READTO LINE'
  61. Do While rc = 0
  62.     'OUTPUT' Translate(line,a,i)
  63.     'READTO LINE'
  64.     End  /*  Do  While  */
  65.  
  66. Exit
  67.  
  68.